package org.br.erp.base.creditrecord.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.br.erp.base.creditrecord.entity.Scmcreditrecorditem;
import org.br.erp.base.creditrecord.mapper.ScmcreditrecorditemMapper;
import org.br.erp.base.creditrecord.service.IScmcreditrecorditemService;
import org.springframework.stereotype.Service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @Description: 信用档案分录
 * @Author: jeecg-boot
 * @Date:   2024-03-26
 * @Version: V1.0
 */
@Service
public class ScmcreditrecorditemServiceImpl extends ServiceImpl<ScmcreditrecorditemMapper, Scmcreditrecorditem> implements IScmcreditrecorditemService {
	
	@Autowired
	private ScmcreditrecorditemMapper scmcreditrecorditemMapper;
	
	@Override
	public List<Scmcreditrecorditem> selectByMainId(String mainId) {
		return scmcreditrecorditemMapper.selectByMainId(mainId);
	}

	@Override
	public List<Scmcreditrecorditem> getCreditRecordItemByCustomerid(String customerid) {
		QueryWrapper<Scmcreditrecorditem> queryWrapper=new QueryWrapper<>();
		queryWrapper.eq("customerid",customerid);
		List<Scmcreditrecorditem> scmcreditrecorditems = scmcreditrecorditemMapper.selectList(queryWrapper);
		return scmcreditrecorditems;
	}
}
